package com.yjkf.zh.admin.dao;

import com.yjkf.zh.admin.model.SysChannel;
import com.yjkf.zh.admin.model.SysDevice;
import com.yjkf.zh.admin.model.SysDevicePointUnit;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysPointUnitMapper {

    List<SysDevicePointUnit> findAll();

    List<SysDevicePointUnit> findAllById(@Param(value="id") Long id);

    List<SysChannel> findChannelAll();

    int insertPointUnit(SysDevicePointUnit sysDevicePointUnit);

    int updatePointUnit(SysDevicePointUnit sysDevicePointUnit);

    //根据userDeviceId与dataChannelId获取
    SysDevicePointUnit findByTwoId(@Param(value="userDeviceId") Long userDeviceId,@Param(value="dataChannelId") Long dataChannelId);

    int deletePointUnit(@Param(value="userDeviceId") Long userDeviceId,@Param(value="dataChannelId") Long dataChannelId);

    int deleteForId(@Param(value = "id") Long id);

    int deleteForUserDeviceId(@Param(value = "userDeviceId") Long userDeviceId);

    SysDevicePointUnit findDpu(@Param(value="userDeviceId") Long userDeviceId,@Param(value="dataChannelId") Long dataChannelId);
}
